package com.hncboy.chatgpt.front.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hncboy.chatgpt.base.domain.entity.ChatCustomerDO;
import com.hncboy.chatgpt.base.domain.entity.ChatRoomDO;
import com.hncboy.chatgpt.base.domain.mongodb.VerificationCode;
import com.hncboy.chatgpt.front.domain.vo.ChatCustomerVO;

/****************************************
 * @name com.hncboy.chatgpt.front.service.impl
 * @description
 * @author limi
 * @since 2023-04-28 17:33
 ***************************************/
public interface CustomerService  extends IService<ChatCustomerDO> {
    ChatCustomerVO infoCustomer(Long id);
    ChatCustomerVO initCustomer(String email) throws Exception;
    /**
     * 生成新用户（邮箱、随机码、是否已被邀请）
     */
    ChatCustomerVO addCustomer(String email, String invitationCode, int isInvited) throws Exception;
    ChatCustomerDO getCustomer(Long id);
    ChatCustomerDO getCustomer(String email);

    /**+
     * 根据邀请码查询用户
     * @param invitationCode
     * @return
     */
    ChatCustomerDO getCustomerByInvitationCode(String invitationCode);
    boolean saveOrUpdate(ChatCustomerDO chatCustomerDO);
     void initInvite();
}
